import random
import os

def gen_data():
    reds = [i + 1 for i in range(33)]
    blues = [i + 1 for i in range(16)]
    return random.sample(reds, 6), random.choice(blues)

def gen_csv(rows=100, file='data.csv'):
    with open(os.path.dirname(__file__) + os.sep + 'data.csv', 'w') as fp:
        fp.write("r1,r2,r3,r4,r5,r6,b\n")
        for _ in range(rows):
            tmp, blue = gen_data()
            tmp.append(blue)
            fp.write(",".join([str(i) for i in tmp]) + "\n")

if __name__ == '__main__':
    gen_csv()
